1. Field of the Invention
The present invention relates to a data recovery system and method of a distributed transaction processing system in which a plurality of data processing systems serving as servers or clients are connected to each other through a communication line and, more particularly, to a data recovery system of a distributed transaction processing system wherein when a given server falls in a system down during transaction completion processing, and an operation is restarted, data recovery can be realized while matching of transaction data between the given server and other servers is maintained.
2. Description of the Related Art
Distributed processing systems are known as systems in which processors having computing functions, auxiliary memories capable of storing a large amount of data, and the like are distributed and can closely communicate with each other through a communication line. Of the distributed processing systems, a distributed transaction processing system of a two-phase commit scheme is known. In this system, a plurality of transaction files are distributed in a plurality of data processing systems serving as servers, and transaction processing is performed in response to a processing request from a data processing system serving as a client. A general operation of distributed processing of such a distributed transaction processing system will be described below.
For the sake of a simple description, assume that one client-side data processing system (to be simply referred to as a client hereinafter) is connected to a data processing system serving as a first server (to be referred to as a server A hereinafter) and a data processing system serving as a second server (to be referred to as a server B hereinafter) through a communication line.
The client accesses a transaction file of the server A in accordance with an application program, and performs predetermined transaction processing. Then, the client accesses a transaction file of the server B, and similarly performs transaction processing. Upon completion of the transaction processing, the client sequentially outputs transaction completion processing requests to the servers A and B. In this case, the client outputs the transaction completion processing requests to the servers A and B in accordance with the two-phase commit scheme. More specifically, the client requests the server A to perform PHASE I processing. In response to the PHASE I processing request, the server A updates the data, i.e., writes the contents of a data buffer in a data file, and subsequently informs the client of the completion of the PHASE I processing. In response to this completion information, the client requests the server B to perform PHASE I processing. Similarly, in response to the PHASE I processing request, the server B updates the data, and subsequently informs the client of the completion of the PHASE I processing. Upon reception of the PHASE I processing completion information from the server B, the client outputs a PHASE II processing request to the server A. In response to the PHASE II processing request, the server A discards journal data indicating an intermediate result of transaction processing recorded in a rollback journal file, and performs release processing of an exclusive resource. That is, the server A performs processing for allowing updating of transaction data which has been locked to perform rollback processing. Rollback processing is performed to cancel previous transaction processing in accordance with journal data recorded in the rollback journal file when a server falls in a system down during transaction completion processing, thereby allowing data recovery. Updating of data must be inhibited until transaction completion processing is completed because of the possibility of this rollback processing. Upon completion of the PHASE II processing, the server A outputs a PHASE II completion information to the client.
In response to the PHASE II completion information, the client outputs a PHASE II processing request to the server B. In response to the PHASE II processing request, the server B performs the above-described journal discard and release processing of updated data. After the completion of the processing, the server B outputs a completion information to the client. The client receives the completion information from the server B and determines that the transaction completion processing is completed.
Assume that the server A has completed the PHASE I processing and the server B falls in a system down during the execution of the PHASE I processing. In this case, the server B cannot determine a specific step to which the transaction completion processing has been completed by the server A. Therefore, in rollback processing, the server B cannot know a specific step to which it should roll back to maintain matching of transaction data with respect to the server A, and data matching cannot be realized between the servers A and B.